package com.alibaba.algo.cooperation.usercomponent.service.user;

import com.alibaba.algo.cooperation.usercomponent.vo.req.user.SelectUserEmployeeByEmployeeIdRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.res.user.SelectUserEmployeeByEmployeeIdResponseVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 类SysUserEmployeeService.java的实现描述：用户员工表 service
 *
 * @author nieganggang 2021-03-12 16:08:17
 */
@FeignClient(url="${feign.userCenterUrl:}", value = "usercenter-service", contextId = "usercenter-app")
public interface SysUserEmployeeService {

    @RequestMapping(value = "/sysUserEmployee/deleteByUserId", method = RequestMethod.POST)
    void deleteByUserId(@RequestParam("userId") Long userId);

    @RequestMapping(value = "/sysUserEmployee/insert", method = RequestMethod.POST)
    void insert(@RequestParam("userId") Long userId, @RequestParam("employeeId") Long employeeId);

    @RequestMapping(value = "/sysUserEmployee/updateIsDeletedByUserIdLastModified", method = RequestMethod.POST)
    void updateIsDeletedByUserIdLastModified(@RequestParam("userId") Long userId, @RequestParam("lastModifyTime") LocalDateTime lastModifyTime);

    @RequestMapping(value = "/sysUserEmployee/update", method = RequestMethod.POST)
    void update(@RequestParam("userId") Long userId, @RequestParam("employeeId") Long employeeId);

    @RequestMapping(value = "/sysUserEmployee/selectListByEmployeeId", method = RequestMethod.POST)
    List<SelectUserEmployeeByEmployeeIdResponseVO> selectListByEmployeeId(@RequestBody SelectUserEmployeeByEmployeeIdRequestVO vo);

    @RequestMapping(value = "/sysUserEmployee/selectListByUserId", method = RequestMethod.POST)
    List<SelectUserEmployeeByEmployeeIdResponseVO> selectListByUserId(@RequestBody SelectUserEmployeeByEmployeeIdRequestVO vo);

}
